#include <iostream>
#include "AvlTree.h"
#include <vector>
#include <ctime>
using namespace std;
template <typename Comparable>
void AvlPrinting(vector<Comparable> &_arr,double inf,double sup);
int main(){
    vector<int> a(1024);
    vector<int> b(4096);
    vector<int> c(16384);
    vector<int> d(65536);
    for(int i=1;i<=1024;i++){
        a[i-1]=i;
    }
    for(int i=1;i<=4096;i++){
        b[i-1]=i;
    }
    for(int i=1;i<=16384;i++){
        c[i-1]=i;
    }
    for(int i=1;i<=65536;i++){
        d[i-1]=i;
    }
    //AvlPrinting(a,0,1024);
    //AvlPrinting(b,0,4096);
    //AvlPrinting(c,0,16384);
    //AvlPrinting(d,0,65536);
    srand(unsigned(time(NULL)));
    int num1=rand()%1024+1;
    //AvlPrinting(a,num1,num1);
    int num2=rand()%4096+1;
    //AvlPrinting(b,num2,num2);
    int num3=rand()%16384+1;
    //AvlPrinting(c,num3,num3);
    int num4=rand()%65536+1;
    //AvlPrinting(d,num4,num4);
    //num2=rand()%3896+1;
    //AvlPrinting(d,num2,num2+199);
    //cout<<num;
    return 0;
}
template <typename Comparable>
void AvlPrinting(vector<Comparable> &_arr,double inf,double sup){
    AvlTree<int> t;
    t._sup=sup;
    t._inf=inf;
    int i=0;
    for(i=0;i<_arr.size();i++){
        t.insert(_arr[i]);
    }
    clock_t start_time=clock();
    t.printTree();
    clock_t end_time = clock();
    cout<<"运行函数所需的时间" <<(double)(end_time-start_time)/CLOCKS_PER_SEC<<"秒" << endl;
}